package com.yan.community.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.*;

import com.github.pagehelper.PageInfo;
import com.yan.club.result.Result;
import com.yan.community.dto.CommunityCategoryDto;
import com.yan.community.model.ClubCommunityCategory;
import com.yan.community.model.ClubCommunityDetail;
import com.yan.community.service.CommunityDetailService;

/**
 * @author 彦
 * @since 2024/1/15 15:12
 */
@RequestMapping("/community/detail")
public class CommunityDetailController {

    @Resource
    private CommunityDetailService communityDetailService;


    /**
     * 得到全部社团详情
     *
     * @param clubCategoryDto
     * @return
     */
    @PostMapping("/page")
    public Result<PageInfo<ClubCommunityCategory>> getAllCategory(@RequestBody CommunityCategoryDto clubCategoryDto) {
//        return clubCategoryService.getAllCategory(clubCategoryDto);
        return null;
    }


    /**
     * 根据id查单个社团信息
     * 该方法用于每个社团负责人查询自己的社团信息
     *
     * @param id
     * @return
     */
    @GetMapping("/getCommunityDetailById")
    public Result<ClubCommunityDetail> getCommunityDetailById(@RequestParam Long id) {
        return communityDetailService.getCommunityDetailById(id);
    }
}
